<?php slot('leftmenu') ?>
<div class="centerboxleft">
	<?php foreach($menu->getElements() as $item): ?>
	<?php if(!$item->hasChildren())continue; ?>
	
	<div class="lmenubox">
		<div class="lmenutop">
			<div class="lmenutopl">
				<img src="/enermaatik/img/leftmgreen.png" width="11" height="35" alt=""/>
			</div>
			<div class="lmenutopmain">
				<p class="lmenu"><?php echo $item->getName() ?> </p>
			</div>
			<div class="clear"></div>
		</div>
		<?php if($item->hasChildren()): ?>
		<div class="lmenutopcontent">
			<div class="menucontent">
				<ul>
					<?php foreach($item->getSubElements() as $item): ?>
					<li>
						<div class="llinkbox">
							<div class="punkt"></div>
							<div class="llink">
								<a class="<?php echo $item->isActive() ? 'active' : '' ?>" href="<?php echo $item->getLink() ?>"><?php echo $item->getName() ?></a>
							</div>
							<div class="clear"></div>
						</div>
						<?php if($item->hasChildren() && $item->isActive()): ?>
						<ul>
							<?php foreach($item->getSubElements() as $item): ?>
							<li class="sub">
								<div class="subbox">
									<div class="arrow"></div>
									<div class="sublink">
										<a href="<?php echo $item->getLink() ?>" class="<?php echo $item->isActive() ? 'active' : '' ?>"><?php echo $item->getName() ?></a>
									</div>
									<div class="clear"></div>
								</div>
                                                                <?php if($item->hasChildren()): ?>
                                                                <ul>
                                                                        <?php foreach($item->getSubElements() as $item): ?>
                                                                        <li class="sub">
                                                                                <div class="subsubbox">
                                                                                        <div class="arrow"></div>
                                                                                        <div class="sublink">
                                                                                                <a href="<?php echo $item->getLink() ?>" class="<?php echo $item->isActive() ? 'active' : '' ?>"><?php echo $item->getName() ?></a>
                                                                                        </div>
                                                                                        <div class="clear"></div>
                                                                                </div>
                                                                        </li>
                                                                        <?php endforeach; ?>
                                                                </ul>
                                                                <?php endif; ?>
							</li>
							<?php endforeach; ?>
						</ul>
						<?php endif; ?>
					</li>
					<?php endforeach; ?>
				</ul>
				
			</div>
		</div>
		<div class="clear"></div>
		<div class="lmenubottom">
			<img src="/enermaatik/img/lmenubottom.png" width="232" height="8" alt=""/>
		</div>
		<?php endif; ?>
	</div>
	<?php endforeach; ?>

<script type="text/javascript">
$('.llink').mouseover(function(){
$(this).parent().addClass('active').find('.punkt').addClass('active');
$('.llink').mouseleave(function(){
$(this).parent().removeClass('active').find('.punkt').removeClass('active');
});
});

$('.sublink').mouseover(function(){
$(this).parent().find('.arrow').addClass('active');
$('.sublink').mouseleave(function(){
$(this).parent().find('.arrow').removeClass('active');
});
});
</script>
</div>
<?php end_slot() ?>